*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  min-width: 0;
  background-color: var(--un-c-bg);
  color: rgb(var(--un-rc-invert));
  line-height: 1.65;
  overflow-x: clip;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--interaction-duration, 0.2s) ease,
    background-color var(--interaction-duration, 0.2s) ease;
}
button {
  transition: color var(--interaction-duration, 0.2s) ease,
    background-color var(--interaction-duration, 0.2s) ease,
    border-color var(--interaction-duration, 0.2s) ease;
}
img {
  max-width: 100%;
  height: auto;
}
ul {
  list-style: none;
}
div.side {
  padding: 38.8px 45px;
  position: fixed;
  inset: 0 auto auto 0;
  width: 263.85px;
}
div.main {
  padding: clamp(24px, 3vw, 48px) clamp(20px, 6vw, 96px)
    clamp(32px, 5vw, 64px) clamp(20px, 3vw, 48px);
  margin-left: 263.85px;
  max-width: 1080px;
  width: min(1080px, calc(100vw - 263.85px));
}

/* aide */
nav.nav-part,
div.tags-part {
  width: 173.85px;
}
.profile,
.profile a {
  display: flex;
  align-items: center;
}

.profile {
  justify-content: center;
}

.profile img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}
.profile h1 {
  margin: 0;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  color: var(--brand-primary);
  font-weight: 600;
  white-space: nowrap;
  /* color: #333; */
}

div.quotes span {
  display: block;
  margin-left: 66px;
  color: var(--text-muted, #64748b);
  font-size: var(--font-size-sm, 0.875rem);
  line-height: 1.6;
  /* color: #333; */
}
/* 横线 */
.side hr {
  margin-top: 16px;
}
/* 侧边栏标题 */
.side h4 {
  color: var(--brand-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 空间 */
.nav-li {
  margin: 1em 0;
  position: relative;
}
.nav-li a {
  color: var(--text-main);
}
.nav-li a:hover {
  color: var(--brand-primary, #0b1c7e);
  font-weight: 600;
}

.nav-li a.is-current {
  color: var(--brand-primary, #0b1c7e);
  font-weight: 600;
}

.archive-entry {
  margin: 10px 0 18px;
  padding: 10px 0 12px;
  border-top: 1px dashed #dbeafe;
  border-bottom: 1px dashed #dbeafe;
}

.archive-link {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--brand-border, #cbd5e1);
  border-radius: 999px;
  color: var(--brand-primary, #0b1c7e);
  background: var(--brand-surface, #f8fbff);
  font-size: 0.9rem;
}

.archive-link:hover {
  background: var(--brand-primary, #0b1c7e);
  color: #fff;
}

.side {
  border-left: 3px solid transparent;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.side.section-podcast {
  border-left-color: #0b1c7e;
  box-shadow: -2px 0 0 rgba(11, 28, 126, 0.1);
}

.side.section-photos {
  border-left-color: #0e7490;
  box-shadow: -2px 0 0 rgba(14, 116, 144, 0.1);
}

.side.section-meme {
  border-left-color: #9333ea;
  box-shadow: -2px 0 0 rgba(147, 51, 234, 0.1);
}

.side.section-blogs {
  border-left-color: #b45309;
  box-shadow: -2px 0 0 rgba(180, 83, 9, 0.1);
}
.nav-hidden {
  display: none;
}
/* .nav-hidden ul::before {
  content: "👉 ";
} */
/* 标签 */
.tags-part a {
  display: flex;
  flex-direction: column;
}
.tags-li {
  display: inline-block;
  margin: 4px;
  font-size: 14px;
}
.first-line-tag {
  margin-top: 0;
}
.tags-part .tag,
.blog-info .tag {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px 8px;
  text-decoration: none;
  color: #333;
}
.tags-part .tag:hover,
.blog-info .tag:hover {
  color: #0b1c7e;
  font-weight: 600;
  box-shadow: 0 0 5px 0 rgba(18, 10, 179, 0.242);
  border: none;
}
/* 插播-博客标签 */
.blog-info .tags {
  display: flex;
  gap: 5px; /* 标签之间的间距 */
}
/* main */
section {
  margin-bottom: 36px;
  padding: clamp(14px, 2vw, 20px);
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.6),
    rgba(255, 255, 255, 0.3)
  );
}

/* 切换模式 */
/* 默认样式（白天模式） */

/* 基本样式变量（白天模式） */
:root {
  --t-rc-primary: 11, 28, 126;
  --t-rc-secondary: 224, 198, 176;
  --un-rc-base: 255, 255, 255; /* 基础颜色（背景色） */
  --un-rc-invert: 0, 0, 0; /* 文字和图标颜色 */
  --un-c-bg: #fff; /* 背景色 */
  --un-c-bg-weak: #f9f9f9; /* 较弱的背景色（通常用于区分不同区域） */
  --un-c-bg-mute: #f1f1f1; /* 低饱和度背景色（通常用于次要区域） */
  --un-rc-accent: var(--t-rc-primary); /* 强调色（主题颜色） */
  --un-c-text: rgba(var(--un-rc-invert), 0.82); /* 主要文本颜色 */
  --un-c-text-light: rgba(var(--un-rc-invert), 0.58); /* 次要文本颜色 */
  --un-c-text-strong: rgba(var(--un-rc-invert), 0.94); /* 强调文本颜色 */
  --un-c-text-mute: rgba(
    var(--un-rc-invert),
    0.2
  ); /* 静音文本颜色（通常用于注释或提示） */
  --un-c-divider: rgba(var(--un-rc-invert), 0.08); /* 分隔线颜色 */
  --un-c-divider-light: rgba(var(--un-rc-invert), 0.04); /* 较轻的分隔线颜色 */
  --un-c-accent: rgb(var(--un-rc-accent)); /* 强调色（RGB 形式） */
  --tc-c-primary: var(--un-c-accent); /* 主要链接颜色 */
  --tc-c-link: var(--un-c-accent); /* 链接颜色 */
}

/* 夜间模式变量 */
.dark-theme {
  --un-rc-base: 19, 23, 31; /* 夜间模式背景色的 RGB 值（#13171F） */
  --un-rc-invert: 255, 255, 255; /* 夜间模式下的文本颜色（通常是白色） */
  --un-c-bg: #13171f; /* 夜间模式背景色 */
  --un-c-bg-weak: #3a3a3a; /* 夜间模式下较弱的背景色 */
  --un-c-bg-mute: #444; /* 夜间模式下低饱和度背景色 */
  --un-rc-accent: 181, 195, 255;
  --un-c-text: rgba(var(--un-rc-invert), 0.82); /* 夜间模式下的主要文本颜色 */
  --un-c-text-light: rgba(
    var(--un-rc-invert),
    0.58
  ); /* 夜间模式下的次要文本颜色 */
  --un-c-text-strong: rgba(
    var(--un-rc-invert),
    0.94
  ); /* 夜间模式下的强调文本颜色 */
  --un-c-text-mute: rgba(
    var(--un-rc-invert),
    0.2
  ); /* 夜间模式下的静音文本颜色 */
  --un-c-divider: rgba(var(--un-rc-invert), 0.08); /* 夜间模式下的分隔线颜色 */
  --un-c-divider-light: rgba(
    var(--un-rc-invert),
    0.04
  ); /* 夜间模式下较轻的分隔线颜色 */
  --un-c-accent: rgb(var(--un-rc-accent)); /* 夜间模式下的强调色（RGB 形式） */
}

/* 夜间模式的样式变化 */
.dark-theme {
  background-color: var(--un-c-bg);
  color: var(--un-c-text);
}

.dark-theme a {
  color: inherit;
}

.dark-theme .blog-item {
  background-color: #181c25;
}

.dark-theme section {
  background: linear-gradient(
    180deg,
    rgba(45, 52, 68, 0.42),
    rgba(24, 28, 37, 0.25)
  );
}

.dark-theme a:hover {
  color: var(--brand-hover);
}

/* 主题切换按钮 */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9;
}

.theme-toggle > input {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
  word-wrap: normal;
}

.theme-toggle > label {
  position: relative;
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 12px;
  flex-shrink: 0;
  /*修改bgc*/
  background-color: rgba(var(--un-rc-invert), 0.1);
  cursor: pointer;
}

.theme-toggle input:focus + label {
  outline: 2px solid;
  /* outline: 5px auto -webkit-focus-ring-color; */
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
label:focus-visible {
  outline: 2px solid #0b1c7e;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 6px;
  background-color: #0b1c7e;
  color: #fff;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.theme-toggle_handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 18px;
  /*修改bgc*/
  background-color: rgba(var(--un-rc-base), 0.86);
  transition: transform 0.3s; /*多的*/
}

.theme-toggle input:checked + label .theme-toggle_handle {
  transform: translateX(18px);
}

.theme-toggle svg {
  position: absolute;
  fill: currentColor;
  top: 5px;
  width: 12px;
  height: 12px;
  z-index: 2;
  transition: color 0.15s linear;
}

.theme-toggle .sun {
  left: 5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .moon {
  right: 5px;
  display: block;
}

.dark-theme .moon {
  display: block;
}

.dark-theme .sun {
  display: block;
}

/* 博客 */
/* blog-gpt */
.blog-item {
  display: flex;
  align-items: flex-start; /* 使图片和文本对齐 */
  /* background-color: #fff; */
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.blog-cover-wrapper {
  width: 80px; /* 固定宽度 */
  height: 80px; /* 高度与宽度一致，保持正方形 */
  margin-right: 15px; /* 图片和文本之间的间距 */
  position: relative;
}

.blog-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-content {
  flex: 1; /* 使内容部分占据剩余空间 */
}

.blog-item h4 {
  font-size: var(--font-size-card-title, 1.125rem);
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.blog-item h4 a {
  text-decoration: none;
}

.blog-item h4 a:hover {
  color: #0b1c7e;
  text-decoration: none;
  font-weight: bold;
}

.blog-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-size-sm, 0.875rem);
  margin-top: 10px;
}

.blog-info .date {
  color: #999;
}

/* blog-gpt */

.content-error,
.content-loading {
  color: var(--un-c-text-light);
  text-align: center;
  padding: 24px 12px;
}

.blog-cover {
  transition: transform 0.35s ease, filter 0.35s ease;
}

.blog-item:hover .blog-cover {
  transform: scale(1.02);
  filter: saturate(1.05);
}

.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 16px;
}

.blog-filter-bar .filter-title {
  font-size: 0.9rem;
  color: #64748b;
}

.filter-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  border-color: #0b1c7e;
  color: #0b1c7e;
}

.filter-chip.active {
  background: #0b1c7e;
  border-color: #0b1c7e;
  color: #fff;
}

.content-hidden {
  display: none !important;
}

.scroll-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #0b1c7e;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(11, 28, 126, 0.35);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 30;
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(11, 15, 25, 0.86);
  z-index: 200;
  padding: 28px;
}

.image-modal.open {
  display: flex;
}

.image-modal-content {
  max-width: min(960px, 92vw);
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.36);
  object-fit: contain;
}

.image-modal-caption {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
}

.image-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.image-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.image-modal-nav.prev {
  left: 18px;
}

.image-modal-nav.next {
  right: 18px;
}

body.modal-open {
  overflow: hidden;
}

.reveal-item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  nav.nav-part,
  div.tags-part {
    width: 160px;
  }

  div.side {
    width: 228px;
    padding: 32px 34px;
  }

  div.main {
    margin-left: 228px;
    padding-right: 32px;
    width: calc(100vw - 228px);
  }
}

@media (max-width: 1024px) {
  body {
    display: block;
  }

  div.main {
    margin-left: 0;
    max-width: 100%;
    width: 100%;
    padding: 18px 20px 40px;
  }

  div.side {
    position: static;
    width: auto;
    padding: 14px 76px 8px 20px;
    border-left: 0;
    box-shadow: none !important;
  }

  div.whole-pro {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .profile {
    justify-content: flex-start;
  }

  div.quotes span {
    margin-left: 0;
  }

  .archive-entry,
  .nav-part,
  .tags-part {
    display: none;
  }

  .nav-hidden {
    display: block;
    padding: 4px 16px 12px;
  }

  .nav-hidden ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    margin: 0;
    padding: 0;
  }

  .nav-hidden li {
    margin: 0;
  }

  .nav-hidden a {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--nav-link-color, #1f2937);
  }

  .nav-hidden a:hover,
  .nav-hidden a:focus-visible {
    color: var(--brand-primary, #0b1c7e);
    background: var(--brand-surface, #f8fbff);
  }

  .theme-toggle {
    top: 20px;
    right: 18px;
  }
}

@media (max-width: 800px) {
  div.side {
    padding: 12px 68px 6px 16px;
  }

  div.main {
    padding: 12px 16px 36px;
  }

  div.whole-pro {
    gap: 12px;
  }

  .profile img {
    width: 44px;
    height: 44px;
  }

  .profile h1 {
    font-size: 1.35rem;
  }

  .quotes {
    font-size: 0.9rem;
  }

  .nav-hidden {
    padding: 6px 12px 12px;
    border-bottom: 1px solid var(--un-c-divider);
  }

  .nav-hidden a {
    padding: 6px 9px;
    font-size: 0.92rem;
  }

  .theme-toggle {
    top: 18px;
    right: 16px;
  }

  section {
    margin-bottom: 24px;
    padding: 14px 12px;
  }

  .blog-info {
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .podcast-infor {
    flex-direction: column;
    align-items: flex-start;
  }

  .podcast-infor img {
    margin: 0 auto 14px;
  }

  .podcast-about {
    margin: 0;
  }

  .blog-info {
    flex-direction: column;
  }

  .image-modal {
    padding: 52px 14px 64px;
  }

  .image-modal-nav.prev {
    left: 8px;
  }

  .image-modal-nav.next {
    right: 8px;
  }

  .image-modal-caption {
    width: calc(100% - 32px);
    text-align: center;
  }
}

/* Homepage alignment with the shared site design system. */
.archive-entry {
  border-color: var(--border-color);
}

.archive-link,
.nav-hidden a,
.nav-li a {
  color: var(--text-main);
}

.archive-link {
  color: var(--brand-primary);
  background: var(--brand-surface);
  border-color: var(--brand-border);
}

.archive-link:hover,
.podcast-toggle-button:hover {
  color: var(--brand-on-primary);
  background: var(--brand-primary);
}

section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-medium);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.episode {
  border-color: var(--border-color);
}

.title,
.blog-item h4 a {
  color: var(--text-strong);
}

.date,
.duration,
.description,
.podcast-loading,
.blog-info .date,
.blog-filter-bar .filter-title {
  color: var(--text-muted);
}

.play-button,
.scroll-to-top {
  color: var(--brand-on-primary);
  background: var(--brand-primary);
}

.podcast-toggle-button,
.more-button {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.blog-item {
  background: var(--surface-muted);
  border-color: var(--border-color);
  border-radius: var(--radius-medium);
}

.tags-part .tag,
.blog-info .tag,
.filter-chip {
  color: var(--text-main);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.filter-chip.active {
  color: var(--brand-on-primary);
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.dark-theme body {
  color: var(--text-main);
  background: linear-gradient(
    180deg,
    var(--page-background) 0%,
    var(--page-background-end) 100%
  );
}

.dark-theme a {
  color: inherit;
}

.dark-theme .title,
.dark-theme .blog-item h4 a {
  color: var(--brand-primary);
}

.dark-theme a:hover,
.dark-theme .more-button:hover,
.dark-theme .blog-item h4 a:hover {
  color: var(--brand-hover);
}

.dark-theme section {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border-color: var(--border-color);
}

.dark-theme .blog-item {
  background: var(--surface-muted);
}

@media (max-width: 380px) {
  div.whole-pro {
    display: block;
  }

  .quotes {
    margin: 4px 0 0 54px;
  }

  .nav-hidden ul {
    gap: 2px 4px;
  }

  .nav-hidden a {
    padding: 5px 7px;
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
